import {getToken } from '@/utils/token'
import { Navigate } from 'react-router-dom';
function AuthRouter({children}) {
    const token = getToken();
    return token ? children : <Navigate to='/login' replace />
}

export {AuthRouter};